package com.jacky.javafx.stage;

import javafx.application.Application;
import javafx.stage.Stage;
import javafx.stage.StageStyle;

public class Stage3 extends Application {


    @Override
    public void start(Stage stage) throws Exception {
        stage.setTitle("S1");
        stage.setWidth(200);
        stage.setHeight(200);
        stage.setY(0);
        stage.setX(600);
        stage.initStyle(StageStyle.DECORATED); // 白背景以及使用平台装饰的样式,也是默认的样式
        stage.show();

        Stage stage2 = new Stage();
        stage2.setTitle("S2");
        stage2.setWidth(200);
        stage2.setHeight(200);
        stage2.setY(220);
        stage2.setX(600);
        stage2.initStyle(StageStyle.UNDECORATED); // 白背景,不装饰(windows实际看不到这个窗口)
        stage2.show();

        Stage stage3 = new Stage();
        stage3.setTitle("S3");
        stage3.setWidth(200);
        stage3.setHeight(200);
        stage3.setY(440);
        stage3.setX(600);
        stage3.initStyle(StageStyle.TRANSPARENT); // 透明背景，不装饰(看不到)
        stage3.show();

        Stage stage4 = new Stage();
        stage4.setTitle("S4");
        stage4.setWidth(200);
        stage4.setHeight(200);
        stage4.setY(660);
        stage4.setX(600);
        stage4.initStyle(StageStyle.UNIFIED); // 根据平台装饰,
        stage4.show();
    }

    public static void main(String[] args) {
        launch(args);
    }
}
